﻿@model IEnumerable<MvcApplication4.Models.LOTE>

@{
    ViewBag.Title = "Lotes Cadastrados";
}

<h2>Lotes Cadastrados</h2>

<p>
    @Html.ActionLink("Cadastrar Lote", "Create")
</p>
<table>
    <tr>
        <th>
            @Html.Label("ID")
        </th>
        <th>
            @Html.Label("Vacina")
        </th>
        <th>
            @Html.Label("Laboratório")
        </th>
        <th>
            @Html.Label("Validade")
        </th>
        <th>
            @Html.Label("Doses")
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.ID_Lote)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.tb_Vacina.Nome_Vacina)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.tb_Laboratorio.Nome_Laboratorio)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Validade)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Num_Doses)
        </td>
        <td>
            @Html.ActionLink("Editar", "Edit", new {  id=item.ID_Lote }) |
            @Html.ActionLink("Deletar", "Delete", new {  id=item.ID_Laboratorio })
        </td>
    </tr>
}

</table>
